package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.pojo.FeaturedSound;
import org.example.pojo.Result;
import org.example.service.FeaturedSoundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sounds")
@Slf4j
public class SoundController {

    @Autowired
    private FeaturedSoundService featuredSoundService;

    @GetMapping("/featured")
    public Result<List<FeaturedSound>> getFeaturedSounds() {
        log.info("获取推荐音频列表");
        return Result.success(featuredSoundService.getFeaturedSounds());
    }
} 